package com.xy.absfactory.order;


import com.xy.absfactory.pizza.BJCheesePizza;
import com.xy.absfactory.pizza.BJGreekPizza;
import com.xy.absfactory.pizza.Pizza;


/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/10 11:02
 * @description
 */
public class BJOrderPizzaFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        if (orderType.equals("cheese"))
            return new BJCheesePizza();
        else if (orderType.equals("greek"))
            return new BJGreekPizza();
        return null;
    }
}
